home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / docshell / nsIURIFixup.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  141 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIURIFixup.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIURIFixup_h__
  6. #define __gen_nsIURIFixup_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIURIFixup */
  21. #define NS_IURIFIXUP_IID_STR "2efd4a40-a5e1-11d4-9589-0020183bf181"
  22.  
  23. #define NS_IURIFIXUP_IID \
  24.   {0x2efd4a40, 0xa5e1, 0x11d4, \
  25.     { 0x95, 0x89, 0x00, 0x20, 0x18, 0x3b, 0xf1, 0x81 }}
  26.  
  27. /**
  28.  * Interface implemented by objects capable of fixing up strings into URIs
  29.  */
  30. class NS_NO_VTABLE nsIURIFixup : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IURIFIXUP_IID)
  34.  
  35.   /** No fixup flags. */
  36.   enum { FIXUP_FLAG_NONE = 0U };
  37.  
  38.   /**
  39.      * Allow the fixup to use a keyword lookup service to complete the URI.
  40.      * The fixup object implementer should honour this flag and only perform
  41.      * any lengthy keyword (or search) operation if it is set.
  42.      */
  43.   enum { FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP = 1U };
  44.  
  45.   /**
  46.      * Tell the fixup to make an alternate URI from the input URI, for example
  47.      * to turn foo into www.foo.com.
  48.      */
  49.   enum { FIXUP_FLAGS_MAKE_ALTERNATE_URI = 2U };
  50.  
  51.   /**
  52.      * Converts an internal URI (e.g. a wyciwyg URI) into one which we can
  53.      * expose to the user, for example on the URL bar.
  54.      *
  55.      * @param  aURI       The URI to be converted
  56.      * @return nsIURI     The converted, exposable URI
  57.      * @throws NS_ERROR_MALFORMED_URI when the exposable portion of aURI is malformed
  58.      * @throws NS_ERROR_UNKNOWN_PROTOCOL when we can't get a protocol handler service
  59.      *         for the URI scheme.
  60.      */
  61.   /* nsIURI createExposableURI (in nsIURI aURI); */
  62.   NS_IMETHOD CreateExposableURI(nsIURI *aURI, nsIURI **_retval) = 0;
  63.  
  64.   /**
  65.      * Converts the specified string into a URI, first attempting
  66.      * to correct any errors in the syntax or other vagaries. Returns
  67.      * a wellformed URI or nsnull if it can't.
  68.      *
  69.      * @param aURIText    Candidate URI.
  70.      * @param aFixupFlags Flags that govern ways the URI may be fixed up.
  71.      */
  72.   /* nsIURI createFixupURI (in AUTF8String aURIText, in unsigned long aFixupFlags); */
  73.   NS_IMETHOD CreateFixupURI(const nsACString & aURIText, PRUint32 aFixupFlags, nsIURI **_retval) = 0;
  74.  
  75. };
  76.  
  77. /* Use this macro when declaring classes that implement this interface. */
  78. #define NS_DECL_NSIURIFIXUP \
  79.   NS_IMETHOD CreateExposableURI(nsIURI *aURI, nsIURI **_retval); \
  80.   NS_IMETHOD CreateFixupURI(const nsACString & aURIText, PRUint32 aFixupFlags, nsIURI **_retval); 
  81.  
  82. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  83. #define NS_FORWARD_NSIURIFIXUP(_to) \
  84.   NS_IMETHOD CreateExposableURI(nsIURI *aURI, nsIURI **_retval) { return _to CreateExposableURI(aURI, _retval); } \
  85.   NS_IMETHOD CreateFixupURI(const nsACString & aURIText, PRUint32 aFixupFlags, nsIURI **_retval) { return _to CreateFixupURI(aURIText, aFixupFlags, _retval); } 
  86.  
  87. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  88. #define NS_FORWARD_SAFE_NSIURIFIXUP(_to) \
  89.   NS_IMETHOD CreateExposableURI(nsIURI *aURI, nsIURI **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateExposableURI(aURI, _retval); } \
  90.   NS_IMETHOD CreateFixupURI(const nsACString & aURIText, PRUint32 aFixupFlags, nsIURI **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateFixupURI(aURIText, aFixupFlags, _retval); } 
  91.  
  92. #if 0
  93. /* Use the code below as a template for the implementation class for this interface. */
  94.  
  95. /* Header file */
  96. class nsURIFixup : public nsIURIFixup
  97. {
  98. public:
  99.   NS_DECL_ISUPPORTS
  100.   NS_DECL_NSIURIFIXUP
  101.  
  102.   nsURIFixup();
  103.  
  104. private:
  105.   ~nsURIFixup();
  106.  
  107. protected:
  108.   /* additional members */
  109. };
  110.  
  111. /* Implementation file */
  112. NS_IMPL_ISUPPORTS1(nsURIFixup, nsIURIFixup)
  113.  
  114. nsURIFixup::nsURIFixup()
  115. {
  116.   /* member initializers and constructor code */
  117. }
  118.  
  119. nsURIFixup::~nsURIFixup()
  120. {
  121.   /* destructor code */
  122. }
  123.  
  124. /* nsIURI createExposableURI (in nsIURI aURI); */
  125. NS_IMETHODIMP nsURIFixup::CreateExposableURI(nsIURI *aURI, nsIURI **_retval)
  126. {
  127.     return NS_ERROR_NOT_IMPLEMENTED;
  128. }
  129.  
  130. /* nsIURI createFixupURI (in AUTF8String aURIText, in unsigned long aFixupFlags); */
  131. NS_IMETHODIMP nsURIFixup::CreateFixupURI(const nsACString & aURIText, PRUint32 aFixupFlags, nsIURI **_retval)
  132. {
  133.     return NS_ERROR_NOT_IMPLEMENTED;
  134. }
  135.  
  136. /* End of implementation class template. */
  137. #endif
  138.  
  139.  
  140. #endif /* __gen_nsIURIFixup_h__ */
  141.